home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 April / Ahoy_Magazine_85-04_1985_Double_L.d64 / vic booter (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  99 lines

  1. 0 rem 'vic booter' copyright 1984 george jones * for vic 20
  2. 1 clr:dv=peek(186)
  3. 2 bs%=692:fi%=512:cs%=93:sr%=735:rn%=733:lm%=702:po%=723:im%=770:mx=65535
  4. 3 s%=679:e%=771:lo%=peek(im%):hi%=peek(e%)
  5. 4 gosub66:rem title
  6. 5 gosub19:rem input disk,id & prog name string
  7. 6 gosub51:rem format disk and write boot
  8. 7 print"[147]";:print"[144][212]he [194][207][207][212] will load":print"and run the program"
  9. 8 print"";pn$:print:print"[146][144]after you have saved"
  10. 9 print"it onto this disk."
  11. 10 print"[212]o test, type:":print"[204][207][193][196]";:printchr$(34)":*"chr$(34);:print",8,1"
  12. 11 close2:close15
  13. 12 print"[193]nother [194][207][207][212] ? (y/n)"
  14. 13 geta$:ifa$=""then13
  15. 14 ifa$<>"y"anda$<>"n"then13
  16. 15 ifa$="y"thenrestore:goto5
  17. 16 print"[147]"
  18. 17 sys58459:rem restore warm start vector
  19. 18 print"[193]ll [196]one!";:goto18
  20. 19 print"[147]":dn$="":id$="":pn$="":pokern%,174:pokern%+1,199:pokeim%,180:pokeim%+1,2
  21. 20 rem poke address of boot into basic warm start vector
  22. 21 print"[201][206][211][197][210][212][160][196][201][211][203][160][212][207][160][198][207][210][205][193][212][146]":print
  23. 22 forc=s%toe%:readz%:pokec,z%:next
  24. 23 print"*[196][193][212][193][160][215][201][204][204][160][194][197][160][197][210][193][211][197][196]*[146]"
  25. 24 print"   [206][197][215][160][196][201][211][203][160][206][193][205][197]:[146] "
  26. 25 inputdn$
  27. 26 iflen(dn$)=0then24
  28. 27 print"    [206][197][215][160][196][201][211][203][160][201][196]:[146] "
  29. 28 inputid$
  30. 29 iflen(id$)=0then27
  31. 30 print"[206]ame the program":print"you want to [194]oot"
  32. 31 inputpn$
  33. 32 iflen(pn$)=0then31
  34. 33 gosub71:rem get string from input buffer and poke to filenam
  35. 34 print"[201]s ";pn$;"[146]":print"a [194][193][211][201][195] program? (y/n)"
  36. 35 geta$:ifa$=""then35
  37. 36 ifa$<>"y"anda$<>"n"then35
  38. 37 ifa$="y"thenreturn:rem now get entry point of ml program
  39. 38 print"[199]ive the [211][217][211] address:[146]"
  40. 39 inputad
  41. 40 ifad=<1orad>=mxthenprint"[207][213][212] [207][198] [210][193][206][199][197]![146]":forc=1to1000:next:print"";:goto38
  42. 41 pokern%,(ad-int(ad/256)*256):rem poke lo byte
  43. 42 pokern%+1,(ad/256):rem poke hi byte
  44. 43 printtab(4)"[201]s data correct? (y/n)"
  45. 44 geta$:ifa$=""then44
  46. 45 ifa$<>"y"anda$<>"n"then44
  47. 46 ifa$="n"thenrun
  48. 47 return
  49. 48 close15:open15,dv,15
  50. 49 input#15,er,er$,t,s
  51. 50 return
  52. 51 gosub48
  53. 52 iferthenprinttab(8)er;er$;t;s:print"[208][204][197][193][211][197] [208][207][215][197][210] [196][207][215][206][160]& [211][212][193][210][212] [207][214][197][210]!";:goto52
  54. 53 close15:open15,dv,15
  55. 54 print#15,"n0:"+dn$+","+id$
  56. 55 close15
  57. 56 gosub48
  58. 57 iferthen52
  59. 58 close2:open2,dv,1,"0:[160]the magic boot,p,w":rem shifted space before title
  60. 59 print#2,chr$(s%-int(s%/256)*256);
  61. 60 print#2,chr$(s%/256);
  62. 61 fori=0tocs%-1
  63. 62 print#2,chr$(peek(s%+i));
  64. 63 next
  65. 64 close2
  66. 65 return
  67. 66 print"[147]";chr$(14):poke36879,25
  68. 67 printtab(7)"[214][201][195] [194][207][207][212][197][210]"
  69. 68 print" ([195]) 1984 [199]eorge [202]ones"
  70. 69 fort=1to2000:next
  71. 70 return
  72. 71 forc=1tolen(pn$)
  73. 72 pokesr%,(peek(fi%))
  74. 73 sr%=sr%+1:fi%=fi%+1
  75. 74 next
  76. 75 pokelm%,len(pn$):rem set length of new program name
  77. 76 return
  78. 77 rem*****************************
  79. 78 rem  mx=65535 maximum address
  80. 79 rem  bs%=692 start of nuboot
  81. 80 rem  fi%=512 system input buffer
  82. 81 rem  cs%=80 no of bytes to save
  83. 82 rem  sr%=735 loc of file name
  84. 83 rem  rn%=733 interpreter loop &
  85. 84 rem  sys address for ml prog
  86. 85 rem  lm%=702 store len(pn$)
  87. 86 rem  im%=770 basic warm start vector
  88. 87 rem  pn$= program name
  89. 88 rem  dn$= disk name
  90. 89 rem  id$= disk id
  91. 90 rem****************************
  92. 91 data40,67,40,49,57,56,52,71,74,79,78,69,83,169,1,162
  93. 92 data8,160,1,32,186,255,169,15,162,223,160,2,32,189,255,169
  94. 93 data0,162,255,160,255,32,213,255,134,45,132,46,32,239,2,32
  95. 94 data91,228,32,89,198,76,174,199,160,160,160,160,160,160,160,160
  96. 95 data160,160,160,160,160,160,160,160,162,0,169,160,157,223,2,232
  97. 96 data224,16,208,246,141,189,2,96,0,139,227,180,2
  98. 97 rem 'vic booter' copyright 1984 george jones * for vic 20
  99.